#include <stdio.h>


/* xiaozhi 2007.9.16 20:55  wise */

int b_s_c_m(int n, int m)
{
	int p, temp, r;

	p = n * m;

	if (n < m)
	{
		temp = n;
		n = m;
		m = temp;
	}

	while (m != 0)
	{
		r = n % m;
		n = m;
		m = r;
	}

	printf("big common divisor is %d \n", n);
	printf("small common multiple is %d \n", p / n);

	return 0;
}

void _main()
{
	int n, m;

	scanf("%d %d", &n, &m);

	b_s_c_m(n, m);
}